/*
 * TotalEquilibriumSolver.h
 *
 *  Created on: 6 Dec 2011
 *      Author: allan
 */

#ifndef TOTALEQUILIBRIUMSOLVER_H_
#define TOTALEQUILIBRIUMSOLVER_H_

// GeoReact includes
#include <Core/EquilibriumConditions.h>
#include <Core/EquilibriumSolver.h>

// GeoReact forward declarations
class CannonicalSystem;

class TotalEquilibriumSolver
{
public:
	TotalEquilibriumSolver();
	
	TotalEquilibriumSolver(const CannonicalSystem& cannonical_system);
	
	void Initialiaze(const CannonicalSystem& cannonical_system);
	
	const ConvergenceDiagnostics
	Solve(const VectorXd& ujnk, double T, double P, VectorXd& n);
	
private:
	EquilibriumSolver equilibrium_solver;
	
	EquilibriumConditions equilibrium_conditions;
};

#endif /* TOTALEQUILIBRIUMSOLVER_H_ */
